<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:template match="/TX">
		<xsl:for-each select="TX_BODY">
			<infopost-request>
				<request-head>
					<xsl:for-each select="ENTITY/COM_ENTITY">
						<insu-id>
							<xsl:value-of select="Ins_Co_ID" />
						</insu-id>
						<trans-id>
							<xsl:value-of select="SvPt_Jrnl_No" />
						</trans-id>
						<!--客户经理网点存在就取客户经理网点，否则取Com节点下的CCBIns_ID -->
						<post>
							<xsl:if test="substring(/TX/TX_BODY/ENTITY/COM_ENTITY/TXN_ITT_CHNL_CGY_CODE,1,4)='1001'">
								<xsl:if test="/TX/TX_BODY/ENTITY/APP_ENTITY/CstMgr_Blng_CCBIns_ID!= ''">
									<xsl:value-of select="/TX/TX_BODY/ENTITY/APP_ENTITY/CstMgr_Blng_CCBIns_ID" />
								</xsl:if>
								<xsl:if test="/TX/TX_BODY/ENTITY/APP_ENTITY/CstMgr_Blng_CCBIns_ID= ''">
									<xsl:value-of select="CCBIns_ID" />
								</xsl:if>
							</xsl:if>
							<xsl:if test="substring(/TX/TX_BODY/ENTITY/COM_ENTITY/TXN_ITT_CHNL_CGY_CODE,1,4)!='1001'">
								<xsl:value-of select="CCBIns_ID" />
							</xsl:if>
						</post>
						<agency-hand>
							<xsl:value-of select="CCB_EmpID" />
						</agency-hand>
						<!-- 交易发起渠道编号 -->
						<column12>
							<xsl:value-of select="TXN_ITT_CHNL_ID" />
						</column12>
						<!-- 交易发起渠道类别 -->
						<column13>
							<xsl:value-of select="TXN_ITT_CHNL_CGY_CODE" />
						</column13>
						<!-- 居民类型代码 -->
						<column1>
							<xsl:value-of select="../APP_ENTITY/Rsdnt_TpCd" />
						</column1>
						<!-- 网点名称 -->
						<column2>
							<xsl:value-of select="../APP_ENTITY/BO_Nm" />
						</column2>
						<!-- 家庭年收入金额 -->
						<column3>
							<xsl:value-of select="../APP_ENTITY/Fam_Yr_IncmAm" />
						</column3>
						<!-- 网点销售人员姓名 -->
						<column4>
							<xsl:value-of select="../APP_ENTITY/BO_Sale_Stff_Nm" />
						</column4>
						<!--销售人员代理保险从业人员资格证书编号 -->
						<column5>
							<xsl:value-of select="../APP_ENTITY/Sale_Stff_AICSQCtf_ID" />
						</column5>
					</xsl:for-each>
					<bank>002</bank>
					<area>002</area>
					<branch />
					<authorized>root</authorized>
					<trans-type>101</trans-type>
					<xsl:for-each select="/TX/TX_HEADER">
						<trans-date>
							<xsl:value-of select="substring(SYS_REQ_TIME,1,8)" />
						</trans-date>
						<trans-time>
							<xsl:value-of select="substring(SYS_REQ_TIME,9,6)" />
						</trans-time>
						<!-- 发起方安全节点编号 -->
						<column6>
							<xsl:value-of select="SYS_REQ_SEC_ID" />
						</column6>
						<!-- 全局事件跟踪号 -->
						<column7>
							<xsl:value-of select="SYS_EVT_TRACE_ID" />
						</column7>
						<!-- 子交易序号 -->
						<column8>
							<xsl:value-of select="SYS_SND_SERIAL_NO" />
						</column8>
					</xsl:for-each>
					<xsl:for-each select="/TX/TX_BODY/COMMON/FILE_LIST_PACK">
						<!-- 文件个数 -->
						<column9>
							<xsl:value-of select="FILE_NUM" />
						</column9>
						<!-- 文件名 -->
						<column10>
							<xsl:value-of select="FILE_NAME" />
						</column10>
						<!-- 文件路径 -->
						<column11>
							<xsl:value-of select="FILE_PATH" />
						</column11>
					</xsl:for-each>
				</request-head>
				<request-newbiz>
					<xsl:for-each select="ENTITY/APP_ENTITY">
						<request-underwriting>
							<application>
								<!--投保人信息 -->
								<policy-holder>
									<!--姓名 -->
									<real-name>
										<xsl:value-of select="Plchd_Nm" />
									</real-name>
									<!--性别 -->
									<gender>
										<xsl:call-template name="TlGender">
											<xsl:with-param name="GenderValue" select="Plchd_Gnd_Cd" />
										</xsl:call-template>
									</gender>
									<!--生日 -->
									<birthday>
										<xsl:value-of select="Plchd_Brth_Dt" />
									</birthday>
									<!--证件类型 -->
									<certi-type>
										<xsl:call-template name="TlCertiType">
											<xsl:with-param name="CertiTypeValue" select="Plchd_Crdt_TpCd" />
										</xsl:call-template>
									</certi-type>
									<!--证件号码 -->
									<certi-code>
										<xsl:value-of select="Plchd_Crdt_No" />
									</certi-code>
									<!--证件生效日 -->
									<certi-start-date>
										<xsl:value-of select="translate(string(Plchd_Crdt_EfDt),'-','')" />
									</certi-start-date>
									<!--证件失效日 -->
									<certi-end-date>
										<xsl:value-of select="translate(string(Plchd_Crdt_ExpDt),'-','')" />
									</certi-end-date>
									<!--国籍 -->
									<xsl:choose>
										<xsl:when test="Plchd_Nat_Cd = '156'">
											<nationality>37</nationality>
										</xsl:when>
										<xsl:when test="Plchd_Nat_Cd = '344'">
											<nationality>71</nationality>
										</xsl:when>
										<xsl:when test="Plchd_Nat_Cd = '446'">
											<nationality>100</nationality>
										</xsl:when>
										<xsl:when test="Plchd_Nat_Cd = '158'">
											<nationality>168</nationality>
										</xsl:when>
										<xsl:otherwise>
											<nationality />
										</xsl:otherwise>
									</xsl:choose>
									<!--婚姻标识 -->
									<marriage-id />
									<!--民族 -->
									<race />
									<!--户籍 -->
									<seat-address />
									<!--投保人地址国家 -->
									<add-nation>
										<xsl:value-of select="PlchdCtcAdrCtyRgon_Cd" />
									</add-nation>
									<!--投保人省 -->
									<city-province>
										<xsl:value-of select="Plchd_Prov_Cd" />
									</city-province>
									<!--投保人市 -->
									<district>
										<xsl:value-of select="Plchd_City_Cd" />
									</district>
									<!--投保人区 -->
									<ward>
										<xsl:value-of select="Plchd_CntyAndDstc_Cd" />
									</ward>
									<!--地址 -->
									<rela-address>
										<xsl:value-of select="Plchd_Dtl_Adr_Cntnt" />
									</rela-address>
									<!--邮编 -->
									<rela-zip>
										<xsl:value-of select="Plchd_ZipECD" />
									</rela-zip>
									<!--家庭联系电话 -->
									<night-phone />
									<!--单位联系电话 -->
									<day-phone>
										<xsl:value-of select="PlchdFixTelDmstDstcNo" />
										<xsl:value-of select="Plchd_Fix_TelNo" />
									</day-phone>
									<!--固话国际代码 -->
									<fix-natiaon>
										<xsl:value-of select="PlchdFixTelItnlDstcNo" />
									</fix-natiaon>
									<!--固话国内代码 -->
									<fix-ward>
										<xsl:value-of select="PlchdFixTelDmstDstcNo" />
									</fix-ward>
									<!-- 固化详细 -->
									<fix-detail>
										<xsl:value-of select="Plchd_Fix_TelNo" />
									</fix-detail>
									<celler>
										<xsl:value-of select="Plchd_Move_TelNo" />
									</celler>
									<!--手机国家 -->
									<celler-nation>
										<xsl:value-of select="PlchdMoveTelItlDstcNo" />
									</celler-nation>
									<!--手机详细 -->
									<celler-detail>
										<xsl:value-of select="Plchd_Move_TelNo" />
									</celler-detail>
									<!--EMAIL -->
									<email>
										<xsl:value-of select="Plchd_Email_Adr" />
									</email>
									<!--投保家庭住址 -->
									<pay-address>
										<xsl:value-of select="Plchd_Comm_Adr" />
									</pay-address>
									<!--投保人家许住址邮编 -->
									<pay-zip>
										<xsl:value-of select="Plchd_ZipECD" />
									</pay-zip>
									<job-com />
									<!--投保人单位联系地址 -->
									<job-address />
									<!--投保人单位邮政编码 -->
									<job-zip />
									<industy />
									<title />
									<job-name />
									<pt-job-name />
									<!--职业代码 -->
									<job-code>
										<xsl:call-template name="TlJob">
											<xsl:with-param name="JobValue" select="Plchd_Ocp_Cd" />
										</xsl:call-template>
									</job-code>
									<!-- 投保人年收入金额 -->
									<yearly-income>
										<xsl:value-of select="Plchd_Yr_IncmAm" />
									</yearly-income>
									<!--投保人被保人关系 -->
									<relation-with-main-insured>
										<xsl:call-template name="TLaPhRela">
											<xsl:with-param name="CodeValue" select="Plchd_And_Rcgn_ReTpCd" />
										</xsl:call-template>
									</relation-with-main-insured>
									<smoking>N</smoking>
								</policy-holder>
								<!-- 被保人信息 -->
								<life-assureds>
									<xsl:choose>
										<!--投保人与被保人为同一人 -->
										<xsl:when test="Plchd_And_Rcgn_ReTpCd = '0133043'">
											<life-assured>
												<la-no>1</la-no>
												<real-name>
													<xsl:value-of select="Plchd_Nm" />
												</real-name>
												<gender>
													<xsl:call-template name="TlGender">
														<xsl:with-param name="GenderValue" select="Plchd_Gnd_Cd" />
													</xsl:call-template>
												</gender>
												<birthday>
													<xsl:value-of select="Plchd_Brth_Dt" />
												</birthday>
												<marriage-id />
												<race />
												<seat-address />
												<homeplace />
												<certi-type>
													<xsl:call-template name="TlCertiType">
														<xsl:with-param name="CertiTypeValue" select="Plchd_Crdt_TpCd" />
													</xsl:call-template>
												</certi-type>
												<certi-code>
													<xsl:value-of select="Plchd_Crdt_No" />
												</certi-code>
												<!--证件生效日 -->
												<certi-start-date>
													<xsl:value-of select="Plchd_Crdt_EfDt" />
												</certi-start-date>
												<!--证件失效日 -->
												<certi-end-date>
													<xsl:value-of select="Plchd_Crdt_ExpDt" />
												</certi-end-date>
												<!--被保人国籍 -->
												<xsl:choose>
													<xsl:when test="Plchd_Nat_Cd = '156'">
														<nationality>37</nationality>
													</xsl:when>
													<xsl:when test="Plchd_Nat_Cd = '344'">
														<nationality>71</nationality>
													</xsl:when>
													<xsl:when test="Plchd_Nat_Cd = '446'">
														<nationality>100</nationality>
													</xsl:when>
													<xsl:when test="Plchd_Nat_Cd = '158'">
														<nationality>168</nationality>
													</xsl:when>
													<xsl:otherwise>
														<nationality />
													</xsl:otherwise>
												</xsl:choose>
												<add-nation>
													<xsl:value-of select="PlchdCtcAdrCtyRgon_Cd" />
												</add-nation>
												<city-province>
													<xsl:value-of select="Plchd_Prov_Cd" />
												</city-province>
												<district>
													<xsl:value-of select="Plchd_City_Cd" />
												</district>
												<ward>
													<xsl:value-of select="Plchd_CntyAndDstc_Cd" />
												</ward>
												<rela-address>
													<xsl:value-of select="Plchd_Dtl_Adr_Cntnt" />
												</rela-address>
												<rela-zip>
													<xsl:value-of select="Plchd_ZipECD" />
												</rela-zip>
												<night-phone />
												<day-phone>
													<xsl:value-of select="PlchdFixTelDmstDstcNo" />
													<xsl:value-of select="Plchd_Fix_TelNo" />
												</day-phone>
												<!--固话国际代码 -->
												<fix-natiaon>
													<xsl:value-of select="PlchdFixTelItnlDstcNo" />
												</fix-natiaon>
												<!--固话国内代码 -->
												<fix-ward>
													<xsl:value-of select="PlchdFixTelDmstDstcNo" />
												</fix-ward>
												<!--固化详细 -->
												<fix-detail>
													<xsl:value-of select="Plchd_Fix_TelNo" />
												</fix-detail>
												<celler>
													<xsl:value-of select="Plchd_Move_TelNo" />
												</celler>
												<!--手机国家 -->
												<celler-nation>
													<xsl:value-of select="PlchdMoveTelItlDstcNo" />
												</celler-nation>
												<!--手机详细 -->
												<celler-detail>
													<xsl:value-of select="Plchd_Move_TelNo" />
												</celler-detail>
												<email>
													<xsl:value-of select="Plchd_Email_Adr" />
												</email>
												<job-com />
												<job-address />
												<job-zip />
												<industy />
												<title />
												<job-name />
												<pt-job-name />
												<job-code>
													<xsl:call-template name="TlJob">
														<xsl:with-param name="JobValue" select="Plchd_Ocp_Cd" />
													</xsl:call-template>
												</job-code>
												<yearly-income>
													<xsl:value-of select="Plchd_Yr_IncmAm" />
												</yearly-income>
												<relation-with-policy-holder>1
												</relation-with-policy-holder>
												<relation-with-main-insured>1</relation-with-main-insured>
												<smoking>N</smoking>
											</life-assured>
										</xsl:when>
										<xsl:otherwise>
											<life-assured>
												<la-no>
													<xsl:number value="position()" />
												</la-no>
												<real-name>
													<xsl:value-of select="Rcgn_Nm" />
												</real-name>
												<gender>
													<xsl:call-template name="TlGender">
														<xsl:with-param name="GenderValue" select="Rcgn_Gnd_Cd" />
													</xsl:call-template>
												</gender>
												<birthday>
													<xsl:value-of select="Rcgn_Brth_Dt" />
												</birthday>
												<marriage-id />
												<race />
												<seat-address />
												<homeplace />
												<certi-type>
													<xsl:call-template name="TlCertiType">
														<xsl:with-param name="CertiTypeValue" select="Rcgn_Crdt_TpCd" />
													</xsl:call-template>
												</certi-type>
												<certi-code>
													<xsl:value-of select="Rcgn_Crdt_No" />
												</certi-code>
												<!--证件生效日 -->
												<certi-start-date>
													<xsl:value-of select="translate(string(Rcgn_Crdt_EfDt),'-','')" />
												</certi-start-date>
												<!--证件失效日 -->
												<certi-end-date>
													<xsl:value-of select="translate(string(Rcgn_Crdt_ExpDt),'-','')" />
												</certi-end-date>
												<!--被保人国籍 -->
												<xsl:choose>
													<xsl:when test="Rcgn_Nat_Cd = '156'">
														<nationality>37</nationality>
													</xsl:when>
													<xsl:when test="Rcgn_Nat_Cd = '344'">
														<nationality>71</nationality>
													</xsl:when>
													<xsl:when test="Rcgn_Nat_Cd = '446'">
														<nationality>100</nationality>
													</xsl:when>
													<xsl:when test="Rcgn_Nat_Cd = '158'">
														<nationality>168</nationality>
													</xsl:when>
													<xsl:otherwise>
														<nationality />
													</xsl:otherwise>
												</xsl:choose>
												<!--被保人地址国家 -->
												<add-nation>
													<xsl:value-of select="RcgnCtcAdr_CtyRgon_Cd" />
												</add-nation>
												<!--被保人省 -->
												<city-province>
													<xsl:value-of select="Rcgn_Prov_Cd" />
												</city-province>
												<!--被保人市 -->
												<district>
													<xsl:value-of select="Rcgn_City_Cd" />
												</district>
												<!--被保人区 -->
												<ward>
													<xsl:value-of select="Rcgn_CntyAndDstc_Cd" />
												</ward>
												<!--被保人详细地址 -->
												<rela-address>
													<xsl:value-of select="Rcgn_Dtl_Adr_Cntnt" />
												</rela-address>
												<rela-zip>
													<xsl:value-of select="Rcgn_ZipECD" />
												</rela-zip>
												<night-phone />
												<day-phone>
													<xsl:value-of select="RcgnFixTelDmst_DstcNo" />
													<xsl:value-of select="Rcgn_Fix_TelNo" />
												</day-phone>
												<!--固话国际代码 -->
												<fix-natiaon>
													<xsl:value-of select="RcgnFixTelItnl_DstcNo" />
												</fix-natiaon>
												<!--固话国内代码 -->
												<fix-ward>
													<xsl:value-of select="RcgnFixTelDmst_DstcNo" />
												</fix-ward>
												<!--固化详细 -->
												<fix-detail>
													<xsl:value-of select="Rcgn_Fix_TelNo" />
												</fix-detail>
												<celler>
													<xsl:value-of select="Rcgn_Move_TelNo" />
												</celler>
												<!--手机国家 -->
												<celler-nation>
													<xsl:value-of select="RcgnMoveTelItnlDstcNo" />
												</celler-nation>
												<!--手机详细 -->
												<celler-detail>
													<xsl:value-of select="Rcgn_Move_TelNo" />
												</celler-detail>
												<email>
													<xsl:value-of select="Rcgn_Email_Adr" />
												</email>
												<job-com />
												<job-address />
												<job-zip />
												<industy />
												<title />
												<job-name />
												<pt-job-name />
												<job-code>
													<xsl:call-template name="TlJob">
														<xsl:with-param name="JobValue" select="Rcgn_Ocp_Cd" />
													</xsl:call-template>
												</job-code>
												<relation-with-policy-holder>
													<xsl:call-template name="TPhLaRela">
														<xsl:with-param name="CodeValue" select="Plchd_And_Rcgn_ReTpCd" />
													</xsl:call-template>
												</relation-with-policy-holder>
												<relation-with-main-insured>1</relation-with-main-insured>
												<smoking>N</smoking>
												<yearly-income>
													<xsl:value-of select="Rcgn_Yr_IncmAm" />
												</yearly-income>
											</life-assured>
										</xsl:otherwise>
									</xsl:choose>
								</life-assureds>
								<!--受益人 -->
								<beneficiaries>
									<xsl:for-each select="Benf_List">
										<xsl:choose>
											<!--PbBenfNum：受益人个数 -->
											<xsl:when test="../Benf_Num = 0">
												<beneficiary>
													<la-no>1</la-no>
													<real-name>法定继承人</real-name>
													<gender />
													<birthday />
													<certi-type />
													<certi-code />
													<certi-start-date />
													<certi-end-date />
													<nationality />
													<address />
													<legal-bene-indi>Y</legal-bene-indi>
													<bene-type>2</bene-type>
													<bene-order>1</bene-order>
													<bene-rate>100.00</bene-rate>
													<relation-with-insured>1</relation-with-insured>
												</beneficiary>
											</xsl:when>
											<xsl:otherwise>
												<xsl:for-each select="Benf_Detail">
													<beneficiary>
														<la-no>1</la-no>
														<!--姓名 -->
														<real-name>
															<xsl:value-of select="Benf_Nm" />
														</real-name>
														<!--性别 -->
														<gender>
															<xsl:call-template name="TlGender">
																<xsl:with-param name="GenderValue" select="Benf_Gnd_Cd" />
															</xsl:call-template>
														</gender>
														<!--生日 -->
														<birthday>
															<xsl:value-of select="Benf_Brth_Dt" />
														</birthday>
														<!--证件类型 -->
														<certi-type>
															<xsl:call-template name="TlCertiType">
																<xsl:with-param name="CertiTypeValue" select="Benf_Crdt_TpCd" />
															</xsl:call-template>
														</certi-type>
														<!--证件号 -->
														<certi-code>
															<xsl:value-of select="Benf_Crdt_No" />
														</certi-code>
														<!--证件生效日 -->
														<certi-start-date>
															<xsl:value-of select="translate(string(Benf_Crdt_EfDt),'-','')" />
														</certi-start-date>
														<!--证件失效日 -->
														<certi-end-date>
															<xsl:value-of select="translate(string(Benf_Crdt_ExpDt),'-','')" />
														</certi-end-date>
														<!--受益人国籍 -->
														<xsl:choose>
															<xsl:when test="Benf_Nat_Cd = '156'">
																<nationality>37</nationality>
															</xsl:when>
															<xsl:when test="Benf_Nat_Cd = '344'">
																<nationality>71</nationality>
															</xsl:when>
															<xsl:when test="Benf_Nat_Cd = '446'">
																<nationality>100</nationality>
															</xsl:when>
															<xsl:when test="Benf_Nat_Cd = '158'">
																<nationality>168</nationality>
															</xsl:when>
															<xsl:otherwise>
																<nationality />
															</xsl:otherwise>
														</xsl:choose>
														<legal-bene-indi>N</legal-bene-indi>
														<!--受益人类型 -->
														<bene-type>
															<xsl:call-template name="TIBeneType">
																<xsl:with-param name="BeneType" select="AgIns_Benf_TpCd" />
															</xsl:call-template>
														</bene-type>
														<!--受益人顺序 -->
														<bene-order>
															<xsl:value-of select="Benf_Bnft_Seq" />
														</bene-order>
														<!--受益比例 -->
														<bene-rate>
															<xsl:if test="Bnft_Pct != ''">
																<xsl:value-of select="number(Bnft_Pct)*number(100)" />
															</xsl:if>
														</bene-rate>
														<!--受益人被保人关系 -->
														<relation-with-insured>
															<xsl:call-template name="TBeneDesignation">
																<xsl:with-param name="CodeValue" select="Benf_And_Rcgn_ReTpCd" />
															</xsl:call-template>
														</relation-with-insured>
														<!--受益人国家代码 -->
														<add-nation>
															<xsl:value-of select="BenfCtcAdr_CtyRgon_Cd" />
														</add-nation>
														<!--受益人省 -->
														<add-province>
															<xsl:value-of select="Benf_Prov_Cd" />
														</add-province>
														<!--受益人市 -->
														<add-district>
															<xsl:value-of select="Benf_City_Cd" />
														</add-district>
														<!--受益人区 -->
														<add-ward>
															<xsl:value-of select="Benf_CntyAndDstc_Cd" />
														</add-ward>
														<!--受益人详细地址 -->
														<address>
															<xsl:value-of select="Benf_Dtl_Adr_Cntnt" />
														</address>
														<xsl:choose>
															<xsl:when test="Benf_Nm='' and Benf_Gnd_Cd='' and Benf_And_Rcgn_ReTpCd='' and  Benf_Crdt_TpCd='' and Benf_Crdt_No='' and Benf_Brth_Dt='' and Benf_Bnft_Seq='' and Bnft_Pct=''">
																<bene-is-empty>Y</bene-is-empty>
															</xsl:when>
															<xsl:otherwise>
																<bene-is-empty>N</bene-is-empty>
															</xsl:otherwise>
														</xsl:choose>
													</beneficiary>
												</xsl:for-each>
											</xsl:otherwise>
										</xsl:choose>
									</xsl:for-each>
								</beneficiaries>
								<!--险种信息 -->
								<products>
									<xsl:for-each select="Busi_List">
										<xsl:for-each select="Busi_Detail">
											<product>
												<la-no>
													<xsl:number value="position()" />
												</la-no>
												<product-num>100</product-num>
												<product-name>
													<xsl:value-of select="Cvr_Nm" />
												</product-name>
												<!-- 主附险标志 -->
												<column1>
													<xsl:value-of select="MainAndAdlIns_Ind" />
												</column1>
												<column2>
													<xsl:value-of select="InsPrem_PyF_MtdCd" />
												</column2>
												<!--险种代码 -->
												<main-riskcode>
													<xsl:value-of select="Cvr_ID" />
												</main-riskcode>
												<external-prd-code>
													<xsl:value-of select="Cvr_ID" />
												</external-prd-code>
												<!--主险份数 -->
												<unit>
													<xsl:value-of select="Ins_Cps" />
												</unit>
												<!--保费 -->
												<discount-prem>
													<xsl:value-of select="InsPrem_Amt" />
												</discount-prem>
												<!--保额 -->
												<amount>
													<xsl:value-of select="Ins_Cvr" />
												</amount>
												<end-date>
													<xsl:value-of select="Ln_Ctr_ExpDt" />
												</end-date>
												<is-waiver>N</is-waiver>
												<waiver-num />
												<waiver-object />
												<!--缴费年期类型 -->
												<charge-period>
													<xsl:call-template name="TlChargePeriod">
														<xsl:with-param name="chargePeriod" select="InsPrem_PyF_Cyc_Cd" />
													</xsl:call-template>
												</charge-period>
												<!--缴费年期 -->
												<charge-year>
													<xsl:value-of select="InsPrem_PyF_Prd_Num" />
												</charge-year>
												<!--保障年期类型 -->
												<coverage-period>
													<xsl:call-template name="TCoveragePeriod">
														<xsl:with-param name="modeValue" select="InsPrem_PyF_Cyc_Cd" />
														<xsl:with-param name="coveragePeriod" select="Ins_Yr_Prd_CgyCd" />
													</xsl:call-template>
												</coverage-period>
												<!--保障年期 -->
												<coverage-year>
													<xsl:value-of select="Ins_Ddln" />
												</coverage-year>
												<!--缴费间隔/频次 -->
												<charge-mode>
													<xsl:call-template name="TChargeMode">
														<xsl:with-param name="ModeValue" select="InsPrem_PyF_Cyc_Cd" />
													</xsl:call-template>
												</charge-mode>
												<!--保额保费计算方向 -->
												<count-way>2</count-way>
												<!--自动垫交标识 -->
												<autopay-flag>
													<xsl:value-of select="ApntInsPremPyAdvnInd" />
												</autopay-flag>
												<!--红利领取方式 -->
												<bonus-choice>
													<xsl:call-template name="TlBonusGetMode">
														<xsl:with-param name="BonusValue" select="XtraDvdn_Pcsg_MtdCd" />
													</xsl:call-template>
												</bonus-choice>
												<!--保险周期 -->
												<insure-period>
													<xsl:value-of select="Ins_Cyc_Cd" />
												</insure-period>
												<!--争议处理方式 -->
												<dispute-arbit-mode>
													<xsl:value-of select="Dspt_Pcsg_MtdCd" />
												</dispute-arbit-mode>
												<!--争议仲裁机构名称 -->
												<dispute-arbit-org>
													<xsl:value-of select="Dspt_Arbtr_Inst_Nm" />
												</dispute-arbit-org>
												<!-- 减额交清标志 -->
												<sub-flag>
													<xsl:value-of select="RdAmtPyCls_Ind" />
												</sub-flag>
												<!-- 自动续保标志 -->
												<Iscash-autopay>
													<xsl:value-of select="Auto_RnwCv_Ind" />
												</Iscash-autopay>
												<!-- 保单密码 -->
												<password>
													<xsl:value-of select="/TX/TX_BODY/APP_ENTITY/InsPolcy_Pswd" />
												</password>
												<!-- 保单拟生效日期 -->
												<cvali-date>
													<xsl:value-of select="/TX/TX_BODY/APP_ENTITY/InsPolcy_Intnd_EfDt" />
												</cvali-date>
											</product>
										</xsl:for-each>
									</xsl:for-each>
								</products>
								<!-- 健康状态 -->
								<!-- <xsl:for-each select="Busi_List"> <xsl:for-each select="Busi_Detail"> <xsl:choose> <xsl:when test="MainAndAdlIns_Ind = 1"> <health-notice> <xsl:value-of select="Ntf_Itm_Ind"/> </health-notice> </xsl:when> </xsl:choose> </xsl:for-each> </xsl:for-each> -->
								<health-notice>
									<xsl:choose>
										<xsl:when test="Ntf_Itm_Ind='1'">
											1
										</xsl:when>
										<xsl:otherwise>
											0
										</xsl:otherwise>
									</xsl:choose>
								</health-notice>
								<!--投保单号 -->
								<apply-code>
									<xsl:value-of select="Ins_Bl_Prt_No" />
								</apply-code>
								<!-- 网点保险兼职代理业务许可证编码 -->
								<column5>
									<xsl:value-of select="BOInsPrAgnBsnLcns_ECD" />
								</column5>
								<!-- 网点销售人员编号 -->
								<column1>
									<xsl:value-of select="BO_Sale_Stff_ID" />
								</column1>
								<!-- 保险代理从业人员资格证书有效日期 -->
								<column2>
									<xsl:value-of select="InsAgnCrStQuaCtVld_Dt" />
								</column2>
								<!-- 网点分管代理保险业务负责人编号 -->
								<column3>
									<xsl:value-of select="BOIChOfAgInsBsnPnp_ID" />
								</column3>
								<!-- 网点分管代理保险业务负责人姓名 -->
								<column4>
									<xsl:value-of select="BOIChOfAgInsBsnPnp_Nm" />
								</column4>
								<!-- 一级分行号 -->
								<column6>
									<xsl:value-of select="Lv1_Br_No" />
								</column6>
								<!--投保时间 -->
								<apply-date>
									<xsl:value-of select="substring(/TX/TX_HEADER/SYS_REQ_TIME,1,8)" />
								</apply-date>
								<!--销售方式 -->
								<sell-way>3</sell-way>
								<!--投保单类型 -->
								<policy-type>3</policy-type>
								<!--投保性质 -->
								<group-single>2</group-single>
								<!--分行代码 -->
								<branch-bank />
								<!--网点代码 -->
								<agency-code />
								<!--经办人 -->
								<agency-hand />
								<!--开户银行 -->
								<bank-code>201</bank-code>
								<!--帐户类型 -->
								<account-type>7</account-type>
								<!--帐户姓名 -->
								<account-name>
									<xsl:value-of select="Plchd_Nm" />
								</account-name>
								<!--帐户号 -->
								<bank-account>
									<xsl:value-of select="Plchd_PyF_AccNo" />
								</bank-account>
								<!--投保人领取账户 -->
								<holder-collect-account>
									<xsl:value-of select="Plchd_Drw_AccNo" />
								</holder-collect-account>
								<!--首期付款方式 -->
								<pay-mode>
									<xsl:call-template name="PayModeCode">
										<xsl:with-param name="srcCode" select="Rnew_PyF_PyMd_Cd" />
									</xsl:call-template>
								</pay-mode>
								<!--续期付款方式 -->
								<pay-next>
									<xsl:call-template name="PayModeCode">
										<xsl:with-param name="srcCode" select="Rnew_PyF_PyMd_Cd" />
									</xsl:call-template>
								</pay-next>
								<column7>
									<xsl:value-of select="Rnew_PyF_PyMd_Cd" />
								</column7>
								<!--代理保险客户条线类型代码 -->
								<column8>
									<xsl:value-of select="Rnew_PyF_PyMd_Cd" />
								</column8>
								<!--保费逾期未付选择 -->
								<xsl:for-each select="Busi_List">
									<xsl:for-each select="Busi_Detail">
										<xsl:choose>
											<!-- 主险健康状态 -->
											<xsl:when test="MainAndAdlIns_Ind = 1">
												<overdue-manage>
													<xsl:choose>
														<xsl:when test="ApntInsPremPyAdvnInd = 1">
															2
														</xsl:when>
														<xsl:otherwise>
															1
														</xsl:otherwise>
													</xsl:choose>
												</overdue-manage>
											</xsl:when>
										</xsl:choose>
									</xsl:for-each>
								</xsl:for-each>
								<!--溢缴保费处理方式 -->
								<over-manage>2</over-manage>
								<!--保单递送方式 -->
								<deliver-type>4</deliver-type>
								<!--币种 -->
								<currency-code>1</currency-code>
								<assumpsit />
								<answer-type>1</answer-type>
								<answer-phone />
								<!--特别约定代码 -->
								<answer-assumpsit>CCB</answer-assumpsit>
								<!--保单印刷号 -->
								<print-code />
							</application>
						</request-underwriting>
					</xsl:for-each>
				</request-newbiz>
			</infopost-request>
		</xsl:for-each>
	</xsl:template>
	<!--性别 -->
	<xsl:template name="TlGender">
		<xsl:param name="GenderValue" />
		<xsl:choose>
			<xsl:when test="$GenderValue='01'">
				M
			</xsl:when>
			<xsl:when test="$GenderValue='02'">
				F
			</xsl:when>
			<xsl:when test="$GenderValue='03' or $GenderValue='99'">
				N
			</xsl:when>
			<xsl:when test="$GenderValue=''" />
			<xsl:otherwise>
				CODE_NOT_EXIST
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!--工作代码 -->
	<xsl:template name="TlJob">
		<xsl:param name="JobValue" />
		<xsl:choose>
			<xsl:when test="$JobValue='A0000' or $JobValue='C0000'">
				006501
			</xsl:when>
			<xsl:when test="$JobValue='B0000'">
				005403
			</xsl:when>
			<xsl:when test="$JobValue='Y0000'">
				006905
			</xsl:when>
			<xsl:when test="$JobValue='D0000'">
				005302
			</xsl:when>
			<xsl:when test="$JobValue='E0000'">
				000101
			</xsl:when>
			<xsl:when test="$JobValue='F0000'">
				000904
			</xsl:when>
			<xsl:when test="$JobValue=''" />
			<xsl:otherwise>
				CODE_NOT_EXIST
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!--证件类型 -->
	<xsl:template name="TlCertiType">
		<xsl:param name="CertiTypeValue" />
		<xsl:choose>
			<!--身份证 -->
			<xsl:when test="$CertiTypeValue='1010'">
				1
			</xsl:when>
			<!-- 临时居民身份证 -->
			<xsl:when test="$CertiTypeValue='1011'">
				1
			</xsl:when>
			<!--军人身份证件 -->
			<xsl:when test="$CertiTypeValue='1020'">
				2
			</xsl:when>
			<!--外国护照 -->
			<xsl:when test="$CertiTypeValue='1052'">
				3
			</xsl:when>
			<!--港澳居民往来内地通行证 -->
			<xsl:when test="$CertiTypeValue='1070'">
				6
			</xsl:when>
			<!--户口簿 -->
			<xsl:when test="$CertiTypeValue='1040'">
				7
			</xsl:when>
			<!--武警身份证件 -->
			<xsl:when test="$CertiTypeValue='1030'">
				8
			</xsl:when>
			<!--其他证件（对公） -->
			<xsl:when test="$CertiTypeValue='2999'">
				9
			</xsl:when>
			<!--台湾居民来往大陆通行证 -->
			<xsl:when test="$CertiTypeValue='1080'">
				9
			</xsl:when>
			<!--外国人居留证 -->
			<xsl:when test="$CertiTypeValue='1120'">
				9
			</xsl:when>
			<!--其他证件（个人） -->
			<xsl:when test="$CertiTypeValue='1999'">
				9
			</xsl:when>
			<!--营业执照 -->
			<xsl:when test="$CertiTypeValue='2010'">
				9
			</xsl:when>
			<!--组织机构代码证 -->
			<xsl:when test="$CertiTypeValue='2020'">
				9
			</xsl:when>
			<!--社会团体法人登记证书 -->
			<xsl:when test="$CertiTypeValue='2030'">
				9
			</xsl:when>
			<!--事业法人登记证书 -->
			<xsl:when test="$CertiTypeValue='2040'">
				9
			</xsl:when>
			<!--税务登记证 -->
			<xsl:when test="$CertiTypeValue='2090'">
				9
			</xsl:when>
			<xsl:when test="$CertiTypeValue=''" />
			<xsl:otherwise>
				CODE_NOT_EXIST
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!--投保人与被保人关系 -->
	<xsl:template name="TLaPhRela">
		<xsl:param name="CodeValue" />
		<xsl:choose>
			<!--空 -->
			<xsl:when test="$CodeValue=''" />
			<!--本人 -->
			<xsl:when test="$CodeValue='0133043'">
				1
			</xsl:when>
			<!--配偶 -->
			<xsl:when test="$CodeValue='0133010'">
				3
			</xsl:when>
			<!--父亲 -->
			<xsl:when test="$CodeValue='0133015'">
				10
			</xsl:when>
			<!--母亲 -->
			<xsl:when test="$CodeValue='0133016'">
				10
			</xsl:when>
			<!--儿子 -->
			<xsl:when test="$CodeValue='0133011'">
				2
			</xsl:when>
			<!--女儿 -->
			<xsl:when test="$CodeValue='0133012'">
				2
			</xsl:when>
			<!--祖父 -->
			<xsl:when test="$CodeValue='0133017'">
				12
			</xsl:when>
			<!--祖母 -->
			<xsl:when test="$CodeValue='0133018'">
				12
			</xsl:when>
			<!--孙子 -->
			<xsl:when test="$CodeValue='0133013'">
				13
			</xsl:when>
			<!--孙女 -->
			<xsl:when test="$CodeValue='0133014'">
				13
			</xsl:when>
			<!--外祖父 -->
			<xsl:when test="$CodeValue='0133031'">
				12
			</xsl:when>
			<!--外祖母 -->
			<xsl:when test="$CodeValue='0133032'">
				12
			</xsl:when>
			<!--外孙 -->
			<xsl:when test="$CodeValue='0133033'">
				13
			</xsl:when>
			<!--外孙女 -->
			<xsl:when test="$CodeValue='0133034'">
				13
			</xsl:when>
			<!--哥哥 -->
			<xsl:when test="$CodeValue='0133019'">
				11
			</xsl:when>
			<!--姐姐 -->
			<xsl:when test="$CodeValue='0133020'">
				11
			</xsl:when>
			<!--弟弟 -->
			<xsl:when test="$CodeValue='0133035'">
				11
			</xsl:when>
			<!--妹妹 -->
			<xsl:when test="$CodeValue='0133036'">
				11
			</xsl:when>
			<!--公公 -->
			<xsl:when test="$CodeValue='0133037'">
				14
			</xsl:when>
			<!--婆婆 -->
			<xsl:when test="$CodeValue='0133038'">
				14
			</xsl:when>
			<!--儿媳 -->
			<xsl:when test="$CodeValue='0133039'">
				14
			</xsl:when>
			<!--岳父 -->
			<xsl:when test="$CodeValue='0133040'">
				14
			</xsl:when>
			<!--岳母 -->
			<xsl:when test="$CodeValue='0133041'">
				14
			</xsl:when>
			<!--女婿 -->
			<xsl:when test="$CodeValue='0133042'">
				14
			</xsl:when>
			<!--其它亲属 -->
			<xsl:when test="$CodeValue='0133009'">
				14
			</xsl:when>
			<xsl:otherwise>
				7
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!--被保人与投保人关系 -->
	<xsl:template name="TPhLaRela">
		<xsl:param name="CodeValue" />
		<xsl:choose>
			<!--空 -->
			<xsl:when test="$CodeValue=''" />
			<!--本人 -->
			<xsl:when test="$CodeValue='0133043'">
				1
			</xsl:when>
			<!--配偶 -->
			<xsl:when test="$CodeValue='0133010'">
				3
			</xsl:when>
			<!--父亲 -->
			<xsl:when test="$CodeValue='0133015'">
				2
			</xsl:when>
			<!--母亲 -->
			<xsl:when test="$CodeValue='0133016'">
				2
			</xsl:when>
			<!--儿子 -->
			<xsl:when test="$CodeValue='0133011'">
				10
			</xsl:when>
			<!--女儿 -->
			<xsl:when test="$CodeValue='0133012'">
				10
			</xsl:when>
			<!--祖父 -->
			<xsl:when test="$CodeValue='0133017'">
				13
			</xsl:when>
			<!--祖母 -->
			<xsl:when test="$CodeValue='0133018'">
				13
			</xsl:when>
			<!--孙子 -->
			<xsl:when test="$CodeValue='0133013'">
				12
			</xsl:when>
			<!--孙女 -->
			<xsl:when test="$CodeValue='0133014'">
				12
			</xsl:when>
			<!--外祖父 -->
			<xsl:when test="$CodeValue='0133031'">
				13
			</xsl:when>
			<!--外祖母 -->
			<xsl:when test="$CodeValue='0133032'">
				13
			</xsl:when>
			<!--外孙 -->
			<xsl:when test="$CodeValue='0133033'">
				12
			</xsl:when>
			<!--外孙女 -->
			<xsl:when test="$CodeValue='0133034'">
				12
			</xsl:when>
			<!--哥哥 -->
			<xsl:when test="$CodeValue='0133019'">
				11
			</xsl:when>
			<!--姐姐 -->
			<xsl:when test="$CodeValue='0133020'">
				11
			</xsl:when>
			<!--弟弟 -->
			<xsl:when test="$CodeValue='0133035'">
				11
			</xsl:when>
			<!--妹妹 -->
			<xsl:when test="$CodeValue='0133036'">
				11
			</xsl:when>
			<!--公公 -->
			<xsl:when test="$CodeValue='0133037'">
				14
			</xsl:when>
			<!--婆婆 -->
			<xsl:when test="$CodeValue='0133038'">
				14
			</xsl:when>
			<!--儿媳 -->
			<xsl:when test="$CodeValue='0133039'">
				14
			</xsl:when>
			<!--岳父 -->
			<xsl:when test="$CodeValue='0133040'">
				14
			</xsl:when>
			<!--岳母 -->
			<xsl:when test="$CodeValue='0133041'">
				14
			</xsl:when>
			<!--女婿 -->
			<xsl:when test="$CodeValue='0133042'">
				14
			</xsl:when>
			<!--其它亲属 -->
			<xsl:when test="$CodeValue='0133009'">
				14
			</xsl:when>
			<xsl:otherwise>
				7
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!--受益人与被保人关系 -->
	<xsl:template name="TBeneDesignation">
		<xsl:param name="CodeValue" />
		<xsl:choose>
			<!--空 -->
			<xsl:when test="$CodeValue=''" />
			<!--本人 -->
			<xsl:when test="$CodeValue='0133043'">
				0
			</xsl:when>
			<!--配偶 -->
			<xsl:when test="$CodeValue='0133010'">
				2
			</xsl:when>
			<!--父亲 -->
			<xsl:when test="$CodeValue='0133015'">
				4
			</xsl:when>
			<!--母亲 -->
			<xsl:when test="$CodeValue='0133016'">
				5
			</xsl:when>
			<!--儿子 -->
			<xsl:when test="$CodeValue='0133011'">
				3
			</xsl:when>
			<!--女儿 -->
			<xsl:when test="$CodeValue='0133012'">
				3
			</xsl:when>
			<!--祖父 -->
			<xsl:when test="$CodeValue='0133017'">
				6
			</xsl:when>
			<!--祖母 -->
			<xsl:when test="$CodeValue='0133018'">
				7
			</xsl:when>
			<!--孙子 -->
			<xsl:when test="$CodeValue='0133013'">
				15
			</xsl:when>
			<!--孙女 -->
			<xsl:when test="$CodeValue='0133014'">
				15
			</xsl:when>
			<!--外祖父 -->
			<xsl:when test="$CodeValue='0133031'">
				6
			</xsl:when>
			<!--外祖母 -->
			<xsl:when test="$CodeValue='0133032'">
				7
			</xsl:when>
			<!--外孙 -->
			<xsl:when test="$CodeValue='0133033'">
				15
			</xsl:when>
			<!--外孙女 -->
			<xsl:when test="$CodeValue='0133034'">
				15
			</xsl:when>
			<!--哥哥 -->
			<xsl:when test="$CodeValue='0133019'">
				8
			</xsl:when>
			<!--姐姐 -->
			<xsl:when test="$CodeValue='0133020'">
				9
			</xsl:when>
			<!--弟弟 -->
			<xsl:when test="$CodeValue='0133035'">
				8
			</xsl:when>
			<!--妹妹 -->
			<xsl:when test="$CodeValue='0133036'">
				9
			</xsl:when>
			<!--公公 -->
			<xsl:when test="$CodeValue='0133037'">
				15
			</xsl:when>
			<!--婆婆 -->
			<xsl:when test="$CodeValue='0133038'">
				15
			</xsl:when>
			<!--儿媳 -->
			<xsl:when test="$CodeValue='0133039'">
				15
			</xsl:when>
			<!--岳父 -->
			<xsl:when test="$CodeValue='0133040'">
				15
			</xsl:when>
			<!--岳母 -->
			<xsl:when test="$CodeValue='0133041'">
				15
			</xsl:when>
			<!--女婿 -->
			<xsl:when test="$CodeValue='0133042'">
				15
			</xsl:when>
			<!--其它亲属 -->
			<xsl:when test="$CodeValue='0133009'">
				15
			</xsl:when>
			<xsl:otherwise>
				15
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!--缴费年期类型 -->
	<xsl:template name="TChargeMode">
		<xsl:param name="ModeValue" />
		<xsl:choose>
			<!--不定期交 -->
			<xsl:when test="$ModeValue='0200'">
				6
			</xsl:when>
			<!--趸交 -->
			<xsl:when test="$ModeValue='0100'">
				5
			</xsl:when>
			<!--月交 -->
			<xsl:when test="$ModeValue='0204'">
				4
			</xsl:when>
			<!--季交 -->
			<xsl:when test="$ModeValue='0201'">
				3
			</xsl:when>
			<!--半年交 -->
			<xsl:when test="$ModeValue='0202'">
				2
			</xsl:when>
			<!--年交 -->
			<xsl:when test="$ModeValue='0203'">
				1
			</xsl:when>
			<!--其他 -->
			<xsl:when test="$ModeValue='9999'">
				0
			</xsl:when>
			<xsl:otherwise>
				0
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!--红利领取方式 -->
	<xsl:template name="TlBonusGetMode">
		<xsl:param name="BonusValue" />
		<xsl:choose>
			<!--直接给付 -->
			<xsl:when test="$BonusValue=0">
				1
			</xsl:when>
			<!--抵交保费 -->
			<xsl:when test="$BonusValue=1">
				2
			</xsl:when>
			<!--累计生息 -->
			<xsl:when test="$BonusValue=2">
				3
			</xsl:when>
			<!--增额交清 -->
			<xsl:when test="$BonusValue=3">
				5
			</xsl:when>
			<xsl:when test="$BonusValue=''">
				3
			</xsl:when>
			<xsl:otherwise>
				CODE_NOT_EXIST
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!--续期付款方式 -->
	<xsl:template name="PayModeCode">
		<xsl:param name="srcCode" />
		<xsl:choose>
			<xsl:when test="$srcCode = '2'">
				3
			</xsl:when>
			<xsl:when test="$srcCode = '3'">
				3
			</xsl:when>
			<xsl:when test="$srcCode = '0'">
				3
			</xsl:when>
			<xsl:otherwise>
				3
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!--缴费年期类型 -->
	<xsl:template name="TlChargePeriod">
		<xsl:param name="chargePeriod" />
		<xsl:choose>
			<!--不定期交 -->
			<xsl:when test="$chargePeriod='0200'">
				5
			</xsl:when>
			<!--趸交 -->
			<xsl:when test="$chargePeriod='0100'">
				1
			</xsl:when>
			<!--月交 -->
			<xsl:when test="$chargePeriod='0204'">
				6
			</xsl:when>
			<!--季交 -->
			<xsl:when test="$chargePeriod='0201'">
				2
			</xsl:when>
			<!--半年交 -->
			<xsl:when test="$chargePeriod='0202'">
				2
			</xsl:when>
			<!--年交 -->
			<xsl:when test="$chargePeriod='0203'">
				2
			</xsl:when>
			<!--其他 -->
			<xsl:when test="$chargePeriod='9999'">
				3
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$chargePeriod" />
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="TlNationality">
		<xsl:param name="NationalityValue" />
		<xsl:choose>
			<xsl:when test="$NationalityValue='156'">
				156
			</xsl:when>
			<xsl:when test="$NationalityValue='344'">
				344
			</xsl:when>
			<xsl:when test="$NationalityValue='158'">
				158
			</xsl:when>
			<xsl:when test="$NationalityValue='446'">
				446
			</xsl:when>
			<xsl:when test="$NationalityValue='392'">
				392
			</xsl:when>
			<xsl:when test="$NationalityValue='840'">
				840
			</xsl:when>
			<xsl:when test="$NationalityValue='643'">
				643
			</xsl:when>
			<xsl:when test="$NationalityValue='826'">
				826
			</xsl:when>
			<xsl:when test="$NationalityValue='250'">
				250
			</xsl:when>
			<xsl:when test="$NationalityValue='276'">
				276
			</xsl:when>
			<xsl:when test="$NationalityValue='410'">
				410
			</xsl:when>
			<xsl:when test="$NationalityValue='702'">
				702
			</xsl:when>
			<xsl:when test="$NationalityValue='360'">
				360
			</xsl:when>
			<xsl:when test="$NationalityValue='356'">
				356
			</xsl:when>
			<xsl:when test="$NationalityValue='380'">
				380
			</xsl:when>
			<xsl:when test="$NationalityValue='458'">
				458
			</xsl:when>
			<xsl:when test="$NationalityValue='764'">
				764
			</xsl:when>
			<xsl:when test="$NationalityValue='999'">
				-1
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$NationalityValue" />
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="TIBeneType">
		<xsl:param name="BeneType" />
		<xsl:choose>
			<!--生存受益人 -->
			<xsl:when test="$BeneType='0'">
				1
			</xsl:when>
			<!--死亡受益人 -->
			<xsl:when test="$BeneType='1'">
				2
			</xsl:when>
			<!--红利受益人 -->
			<xsl:when test="$BeneType='2'">
				3
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$BeneType" />
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!--保障年期类型 -->
	<xsl:template name="TCoveragePeriod">
		<xsl:param name="modeValue" />
		<xsl:param name="coveragePeriod" />
		<xsl:choose>
			<!--不定期 -->
			<xsl:when test="$coveragePeriod='01'">
				0
			</xsl:when>
			<!--周期 -->
			<xsl:when test="$coveragePeriod='03'">
				<xsl:choose>
					<xsl:when test="$modeValue='0203' or $modeValue='0100' ">
						2
					</xsl:when>
					<xsl:when test="$modeValue='0201' or $modeValue='0202' or $modeValue='0204'">
						4
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$coveragePeriod" />
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<!--至某确定年龄 -->
			<xsl:when test="$coveragePeriod='04'">
				3
			</xsl:when>
			<!--终身 -->
			<xsl:when test="$coveragePeriod='05'">
				1
			</xsl:when>
			<!--一次 -->
			<xsl:when test="$coveragePeriod='02'">
				2
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$coveragePeriod" />
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
</xsl:stylesheet>
